package two;

/**
 * @author zzb
 * @since 2021-01-12
 */

//启动
public class Client {
  public static void main(String[] args) {
    IAnimalFactory blackAnimalFactory = new BlackAnimalFactory();
    ICat blackCat = blackAnimalFactory.createCat();
    blackCat.eat();//The black cat is eating!

    IDog blackDog = blackAnimalFactory.createDog();
    blackDog.eat();//The black dog is eating!

    IAnimalFactory whiteAnimalFactory = new WhiteAnimalFactory();
    ICat whiteCat = whiteAnimalFactory.createCat();
    whiteCat.eat();//The white cat is eating!

    IDog whiteDog = whiteAnimalFactory.createDog();
    whiteDog.eat();//The white dog is eating!
  }
}
